<?php
	App::uses('AppController','Controller');
	
	class HousesController extends AppController
	{
		var $name = 'Houses';
		var $layout = 'main';
		
		function HouseListing(){
			$this->set('houses',$this->House->find('all'));	
		}
		
		function ListYourSpace(){
			Controller::loadModel('TypeOfSpace');
			$this->set('spaces',$this->TypeOfSpace->find('all'));
		}
		
		function PropertyType($id = null){
			$this->Session->write('House.spaceId',$id);
			Controller::loadModel('TypeOfPlace');
			$this->set('places',$this->TypeOfPlace->find('all'));
		}
		
		function Location($id = null){
			$this->layout = 'mainwithgmap';
			$this->Session->write('House.placeId',$id);
		}
	}
?>